<template>
  <div class="PayNoticeAPP">
    <div class="PayNotice">
      <div class="PayNotice-Header">
        <div class="PayNotice-Header-Money">
          {{Detail.title ? Detail.title : '获取中'}}
        </div>
        <!-- <div class="PayNotice-Header-Time">
          {{Detail.content}}
        </div> -->
        <div class="PayNoticePublic-Body">
          <div class="Body-Item">
            <div class="title"><span></span><span>{{Detail.publish_time ? Detail.publish_time : '获取中'}}</span></div>
            <div class="Cont"> {{Detail.content ? Detail.content :'获取中...' }}</div>
            <div class="School">{{Detail.classname ? Detail.classname : '获取中'}}</div>
          </div>
        </div>
      </div>


      <div class="PayNotice-Confirm">
        <button @click="GoToIndex()">返回</button>
      </div>

    </div>
  </div>
</template>

<script>
  import PassWord from '@/assets/assembly/PassWord'
  import Message from '@/assets/assembly/Message'
  import Key from '@/assets/assembly/Key';
  import {
    Indicator,
    Toast
  } from 'mint-ui';
  export default {
    name: 'PayNoticePublic',
    data() {
      return {
        WxState: false,
        BankState: true,
        TopNum: 0,
        PayState: false,
        TdChecked: false,
        mes: '请输入密码',
        HeightCheck: false,
        GetRouter: {},
        Detail: '',
        Info: ''
      }
    },
    created: function () {
      // var Notice = sessionStorage.getItem('Notice');
      // this.$store.state.Notice = JSON.parse(Notice);
      // this.GetRouter = this.$store.state.Notice;
      this.GetRouter = this.$route.params;
      this.Notice();
      this.NoticeStu(this.GetRouter.view);
    },
    components: {
      PassWord,
      Message,
      Key
    },
    methods: {

      GoToIndex() {
        this.$router.push({
          path: `/Index`
        })
      },
      // 获取通知详情
      Notice() {
        var vm = this;
        Indicator.open({
          text: '加载中...',
        });
        this.$ApiCom.NoticeDetail(this.GetRouter.childrenid, this.GetRouter.id, this.GetRouter.type).then(function (res) {
          Indicator.close();
          vm.Detail = res.data.data.noticeDetail;
        })
      },
      //   阅读状态
      NoticeStu(view) {
        if (view == 0) {
          this.$ApiCom.ParentIsViewNotice(this.GetRouter.childrenid, this.GetRouter.id, this.GetRouter.type).then(
            function (res) {
              console.log(res)
            })
        }
      }


    },
    mounted() {

    },
    filters: {}
  }

</script>

<style scoped>
  @import url("css/PayNoticePublic.css");

</style>
